package com.sz.biz.common.customer.service;

import com.sz.biz.common.customer.entity.CusCustomerOrderMessage;
import com.sz.biz.common.customer.dto.CusCustomerOrderMessageDto;

import java.util.List;

/**
 * Function: TODO: ADD FUNCTION <br>
 * Author: Johnboy <br>
 * Date: 2017-08-28 15:42:00
 */
public interface CusCustomerOrderMessageService {
    /**
     *
     * @param cusCustomerOrderMessage
     */
    void save(CusCustomerOrderMessage cusCustomerOrderMessage);

    /**
     * 查询最后一次发送消息的发送结果
     * @param orderId
     * @param orderStatus
     * @param businessType
     * @return
     */
    CusCustomerOrderMessageDto queryLastResult(String orderId,String orderStatus,String businessType);

    /**
     * 查询发送的次数
     *
     * @param businessType
     * @param orderNo
     * @param orderStatus
     * @return
     */
    int querySendTimes(String businessType, String orderNo, String orderStatus);

    /**
     * 查询 同一种状态 同一个业务类型的 List 订单号的数据
     *
     * @param orderIds
     * @param orderStatus
     * @param businessType
     * @return
     */
    List<CusCustomerOrderMessageDto> queryOrdersResult(List<CusCustomerOrderMessageDto>  messageDtos);

    void updateOrderNoByOrderNo(String oldOrderNo, String newOrderNo);
}
